package cn.chason678.springbootwebdemo;

public enum ErrorType {

    LOGIN_FAIL("443", "登陆失败"),
    NOT_LOGIN("444", "未登录"),
    HAVE_NO_PERMISSION("445", "没有权限"),
    USERNAME_PASSWORD_IS_WRONG("10001", "账号或密码错误"),
    USER_ROLE_FREEZE("10011", "账户已冻结"),
    USER_TEMPORARY_FREEZE("10012", "账户异常临时冻结"),
    PARAM_ISNULL("10002", "参数不能为空"),
    PARAM_IS_WRONG("10003", "参数错误"),
    RESULT_FAIL("11001", "操作失败"),
    ILLEGAL_OPERATION("11002", "非法操作"),
    DATA_EXISTS("11003", "记录已存在"),
    COMPANY_EXISTS("11004", "该企业已存在"),
    RESULT_ISNULL("21001", "查无记录"),
    USER_UNEXISTS("21002", "查无用户"),
    USER_ROLE_UNEXISTS("21003", "查无用户角色"),
    USER_ROLE_OVERFLOW("21004", "用户角色不唯一"),
    COMPANY_UNEXISTS("21005", "公司不存在"),
    USER_EXISTS("21006", "用户已存在"),
    DEVICE_UNEXISTS("21007", "设备不存在"),
    WX_MP_SESSION_EXPIRED("21008", "小程序SessionKey过期"),
    DEVICE_ALREADY_ACTIVE("21009", "设备已经为激活状态"),
    USER_ROLE_EXISTS("21010", "用户角色已存在"),
    IS_NOT_WORK("21011", "不是工作人员"),
    CANT_INVITE_YOURSELF("21101", "不能邀请自己"),
    BALANCE_NOT_ENOUGH("22001", "余额不足"),
    APPLICATION_ALREADY_SHIPMENTS("22001", "该申请已发货"),
    ACTIVITY_UNEXISTS("23001", "抽奖活动不存在"),
    LOTTERY_UNEXISTS("23002", "抽奖实例不存在"),
    ACTIVITY_NOT_START("23003", "活动未开始"),
    ACTIVITY_OVER("23004", "活动已结束"),
    NOHAVE_PRIZE("23005", "奖品已发完"),
    USER_LOTTERY_CHANCE_NULL("23006", "达到抽奖次数上限"),
    LOTTERY_CODE_INVALID("23007", "抽奖兑换码无效"),
    ORDER_UNEXISTS("23008", "订单不存在"),
    ORDER_NOT_PAY("23009", "订单未支付"),
    ORDER_USED("23010", "订单已参与过抽奖"),
    LOTTERY_RECORD_UNEXISTS("23011", "中奖记录不存在"),
    LOTTERY_RECORD_CHECKED("23012", "中奖记录已核销"),
    LOTTERY_RECORD_EXPIRED("23013", "中奖记录已过期"),
    SMS_CODE_LIMIT("31001", "短信验证码发送次数达到上限"),
    SMS_CODE_FALSE("31002", "短信验证码验错误"),
    CAPTCHA_CODE_FALSE("31003", "验证码验错误"),
    HAVE_NOT_OWN_DEVICE("40001", "存在不属于自己的设备"),
    DEVICE_COUNT_MISMATCHING("40002", "设备数量不匹配"),
    ;

    private String key;

    private String value;

    ErrorType(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
